QT       += core gui serialport

QT += printsupport

win32 {
    # 假设FFTW放在项目根目录的fftw文件夹下
    INCLUDEPATH += $$PWD/fftw
    LIBS += -L$$PWD/fftw -llibfftw3-3
}


# TEMPLATE = app
QT += opengl   # 确保包含 OpenGL 模块

QT -= core5compat svg multimedia    # 移除非必要模块

# 根据平台链接 OpenGL 库
win32 {
    LIBS += -lopengl32        # Windows 的 OpenGL 库
} else {
    LIBS += -lGL              # Linux/Unix 的 OpenGL 库
}

CONFIG += optimize_size            # 大小优化
win32: LIBS += -ldwmapi

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++17

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
# DEFINES += QCUSTOMPLOT_USE_OPENG #openGL 硬件加速
DEFINES += QCUSTOMPLOT_USE_OPENGL


SOURCES += \
    File/File.cpp \
    UI/ui_styles.cpp \
    Uart/Uart.cpp \
    main.cpp \
    mainwindow.cpp \
    qcustomplot.cpp

HEADERS += \
    File/File.h \
    UI/ui_styles.h \
    Uart/Uart.h \
    mainwindow.h \
    qcustomplot.h

FORMS += \
    mainwindow.ui

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

RESOURCES += \
    ico.qrc

#添加图标
RC_ICONS += icons/COMTool.ico

TARGET = QTComTool
